<div><a href="{$base_url}&action=page_create" class="button add_item"><span>Добавить страницу</span></a></div>
<table class="list">
    <tr>
		<th class="_20">Публ.</th>
		<th class="_20">Ред.</th>
		<th class="_20">Права</th>
		<th>Заголовок</th>
		<th>Ссылка</th>
		<th>Шаблон</th>
		<th class="_20">Привязка</th>
		<th class="_20">Старт.</th>
		<th class="_20">Удл.</th>
    </tr>

	{foreach from=$pages item=page}
	<tr>
		<td class="center">
			{if $page->is_home}
				<img src="{$tpl_url}images/offline.png" />
			{elseif $page->active == 1}
				<a href="{$base_url}&action=page_unactive&id={$page->id}"><img src="{$tpl_url}images/online.png" /></a>
			{else}
				<a href="{$base_url}&action=page_active&id={$page->id}"><img src="{$tpl_url}images/busy.png" /></a>
			{/if}
		</td>
		<td class="center">
			<a href="{$base_url}&action=page_edit&id={$page->id}"><img src="{$tpl_url}images/pencil.png"/></a>
		</td>
		<td class="center">
			<a href="{$base_url}&action=page_rights&id={$page->id}"><img src="{$tpl_url}images/users.png"/></a>
		</td>
		<td>
			<a href="{$page->url}">{$page->title}</a>
		</td>
		<td>
			{$page->alias}
		</td>
		<td>
			{$page->Template->title} ({$page->Template->name})
		</td>
		<td class="center">
			{if $page->menu}
				<span style="color: green">да</span>
			{else}
				<span style="color: red">нет</span>
			{/if}
		</td>
		<td class="center">
			{if $page->is_home == 1}
				<img src="{$tpl_url}images/home_active.png"/>
			{elseif $page->active == 1}
				<a href="{$base_url}&action=page_home&id={$page->id}"><img src="{$tpl_url}images/home_unactive.png" /></a>
			{else}
				<img src="{$tpl_url}images/home_unactive.png" />
			{/if}
		</td>
		<td class="center">
			{if $page->is_home == 1}
				<img src="{$tpl_url}images/_trash.png"/>
			{else}
				<a onclick="if(confirm('Вы дейтвительно желаете удалить эту страницу?')) location.href = this.href; return false;" href="{$base_url}&action=page_delete&id={$page->id}"><img src="{$tpl_url}images/trash.png"/></a>
			{/if}
		</td>
	</tr>
	{/foreach}
</table>